//
//  CTMediator+ConnectionAction.h
//  at_xiaoge_client
//
//  Created by Linyu Niu on 06/03/2018.
//  Copyright © 2018 Linyu Niu. All rights reserved.
//

#import <CTMediator/CTMediator.h>
@interface CTMediator(ConnectionAction)



/**
 这个是在注册，登录，更换手机号获取的token，只能用一次

 @param token token
 */
-(void)setToken:(NSString *)token;

/**
 退出时清空一些本地或内存当中的用户信息
 */
-(void)clearUserData;



/**
 获取token

 @param type 1是注册或登录，2是更换手机号
 @param block 回调
 */
-(void)getTokenWithTokentype:(NSString *)type block:(void(^)(NSDictionary *dic))block;


/**
 发送短信验证码

 @param type 短信的类型:1注册，2更换手机号；
 @param mobile 手机号
 @param block 回调
 */
-(void)sendMessageWithType:(NSString *)type mobile:(NSString *)mobile block:(void(^)(NSDictionary *dic))block;


/**
 登录或注册

 @param mobile 手机号
 @param code 验证码
 @param block 回调
 */
-(void)registerOrLogin:(NSString *)mobile code:(NSString *)code pwd:(NSString *)pwd block:(void(^)(NSDictionary *dic))block;


/**
 获取用户信息

 @param block 回调
 */
-(void)getUserInfo:(void(^)(NSDictionary *dic))block;


-(void)uploadUserHeadImage:(UIImage *)img userId:(NSString *)userId registIs:(BOOL)registIs block:(void(^)(NSDictionary * dic))block;


-(void)uploadIDCard:(NSString *)type image:(UIImage *)img cardNumber:(NSString *)number name:(NSString *)name courierId:(NSString *)courierId registIs:(NSInteger)registIs block:(void(^)(NSDictionary *dic))block;

-(void)login:(NSString *)mobile pwd:(NSString *)pwd block:(void(^)(NSDictionary *dic))block;

-(void)getCourierLatestExpressByNumber:(NSString *)expressNumber block:(void(^)(NSDictionary *dic))block;
-(void)bindCourierExpressNo:(NSString *)couierID registIs:(NSInteger)registIs expressNO:(NSString *)expressNO expressId:(NSString *)expressId block:(void(^)(NSDictionary *dic))block;
-(void)getCourierState:(NSString *)userId block:(void(^)(NSDictionary *dic))block;
-(void)messageListblock:(void(^)(NSDictionary *dic))block;
-(void)getMyWalletData:(void(^)(NSDictionary *dic))block;
-(void)getWalletDetail:(NSString *)accountId  block:(void(^)(NSDictionary *dic))block;
-(void)onDutyDeal:(void(^)(NSDictionary *dic))block;
-(void)downDutyDeal:(void(^)(NSDictionary *dic))block;
-(void)rushOrderListWithLocation:(NSString *)clocation  block:(void(^)(NSDictionary *dic))block;
-(void)myOrderList:(void(^)(NSDictionary *dic))block;
-(void)netSendAvailable:(void(^)(NSDictionary *dic))block;
@end
